#include "GlobalMessage.h"


GlobalMessage::GlobalMessage(void)
	:m_fTimeFromLastFrame(0.0)
	,m_bResourceReady(false)
	,m_bSelectGrid(false)
{
	m_ChessBoard.Reset();
}


GlobalMessage::~GlobalMessage(void)
{
}

void GlobalMessage::SetTimeFromLastFrame( float time )
{
	m_fTimeFromLastFrame = time;
}

float GlobalMessage::GetTimeFromLastFrame()
{
	return m_fTimeFromLastFrame;
}

GlobalMessage* GlobalMessage::Instance()
{
	static GlobalMessage* m_instance = NULL;
	if(!m_instance)
		m_instance = new GlobalMessage();
	return m_instance;
}

D3DXMATRIX GlobalMessage::GetViewMatrix()
{
	return m_matView;
}

void GlobalMessage::SetViewMatrix( const D3DXMATRIX& view )
{
	m_matView = view;
}

D3DXMATRIX GlobalMessage::GetProjMatrix()
{
	return m_matProj;
}

void GlobalMessage::SetProjMatrix( const D3DXMATRIX& proj )
{
	m_matProj = proj;
}

void GlobalMessage::ResourceLoadSuccess()
{
	m_bResourceReady = true;
}

bool GlobalMessage::ResoueceIsReady()
{
	return m_bResourceReady;
}